<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
    <link href="../../assets/lib/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" />
    <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
	<div style="margin:0 auto;padding:20px;">
	    <form class="layui-form" action="" id="showForm" autocomplete="off">
	    	<div class="layui-form-item layui-col-xs12">
    			<span class="hr-title">基础信息</span><hr>
	    	</div>
	        <div class="layui-form-item layui-col-xs6">
		        <label class="layui-form-label">产品名称<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<input type="text" id="materialName" name="materialName" win-verify="required" placeholder="请输入产品名称" class="layui-input" maxlength="50"/>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs6">
	            <label class="layui-form-label">型号<i class="red">*</i></label>
	            <div class="layui-input-block">
	                <input type="text" id="model" name="model" win-verify="required" placeholder="请输入型号" class="layui-input" maxlength="50"/>
	            </div>
	        </div>
	        <div class="layui-form-item layui-col-xs6">
	            <label class="layui-form-label">一级类型<i class="red">*</i></label>
	            <div class="layui-input-block">
	                <select lay-filter="categoryId" lay-search="" win-verify="required" id="categoryId">
	                    
                    </select>
	            </div>
	        </div>
	        <div class="layui-form-item layui-col-xs6">
	            <label class="layui-form-label">二级类型<i class="red">*</i></label>
	            <div class="layui-input-block">
	                <select lay-filter="categoryIdSec" lay-search="" win-verify="required" id="categoryIdSec">
	                    
                    </select>
	            </div>
	        </div>
	        <div class="layui-form-item layui-col-xs12">
		        <label class="layui-form-label">备注</label>
		        <div class="layui-input-block">
		        	<textarea id="remark" placeholder="请填写备注" maxlength="200" class="layui-textarea" style="height: 100px;"></textarea>
		        </div>
		    </div>
	        <div class="layui-form-item layui-col-xs12">
    			<span class="hr-title">价格信息</span><hr>
	    	</div>
	    	<div class="layui-form-item layui-col-xs12">
		        <label class="layui-form-label">多单位<i class="red">*</i></label>
		        <div class="layui-input-block winui-switch">
	                <input id="unit" name="unit" lay-filter="unit" type="checkbox" lay-skin="switch" lay-text="是|否" value="false" />
	            </div>
		    </div>
	    	<div class="layui-form-item layui-col-xs6 single-term">
		        <label class="layui-form-label">安全存量<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<input type="text" id="safetyTock" name="safetyTock" win-verify="number" placeholder="请输入安全存量" class="layui-input"/>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs6 single-term">
		        <label class="layui-form-label">单位<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<input type="text" id="unitName" name="unitName" win-verify="" placeholder="请输入单位" class="layui-input" maxlength="25"/>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs6 single-term">
		        <label class="layui-form-label">零售价<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<input type="text" id="retailPrice" name="retailPrice" win-verify="money" placeholder="请输入零售价" class="layui-input"/>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs6 single-term">
		        <label class="layui-form-label">最低售价<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<input type="text" id="lowPrice" name="lowPrice" win-verify="money" placeholder="请输入最低售价" class="layui-input"/>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs6 single-term">
		        <label class="layui-form-label">预计采购价<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<input type="text" id="estimatePurchasePrice" name="estimatePurchasePrice" win-verify="money" placeholder="请输入预计采购价" class="layui-input"/>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs6 single-term">
		        <label class="layui-form-label">销售价<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<input type="text" id="salePrice" name="salePrice" win-verify="money" placeholder="请输入销售价" class="layui-input"/>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs12 many-term">
		        <label class="layui-form-label">单位<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<select lay-filter="unitGroupId" lay-search="" id="unitGroupId">
	                    
                    </select>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs6 many-term">
		        <label class="layui-form-label">首选入库单位<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<select lay-filter="firstInUnit" lay-search="" id="firstInUnit">
	                    
                    </select>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs6 many-term">
		        <label class="layui-form-label">首选出库单位<i class="red">*</i></label>
		        <div class="layui-input-block">
		        	<select lay-filter="firstOutUnit" lay-search="" id="firstOutUnit">
	                    
                    </select>
		        </div>
		    </div>
	        <div class="layui-form-item layui-col-xs12 many-term">
		        <label class="layui-form-label">价格表<i class="red">*</i></label>
		        <div class="layui-input-block">
		            <table class="layui-table">
		                <thead>
		                    <tr>
		                    	<th style="width: 60px;">单位类型</th>
		                        <th style="width: 60px;">计量单位</th>
		                        <th>安全存量<i class="red">*</i></th>
		                        <th>零售价<i class="red">*</i></th>
		                        <th>最低售价<i class="red">*</i></th>
		                        <th>预计采购价<i class="red">*</i></th>
		                        <th>销售价<i class="red">*</i></th>
		                    </tr>
		                </thead>
		                <tbody id="useTable" class="insurance-table">
		                </tbody>
					</table>
		        </div>
		    </div>
		    <div class="layui-form-item layui-col-xs12">
		        <div class="layui-input-block">
		            <button class="winui-btn" id="cancle">取消</button>
		            <button class="winui-btn" lay-submit lay-filter="formAddBean">保存</button>
		        </div>
		    </div>
	    </form>
	</div>
	
	<script type="text/x-handlebars-template" id="beanTemplate">
		<tr trcusid="{{trId}}" unitid="{{unitId}}">
			<td>{{unitNameType}}</td>
			<td>{{unitName}}</td>
			<td><input type="text" class="layui-input" id="{{safetyTock}}" win-verify="number"/></td>
			<td><input type="text" class="layui-input" id="{{retailPrice}}" win-verify="money"/></td>
			<td><input type="text" class="layui-input" id="{{lowPrice}}" win-verify="money"/></td>
			<td><input type="text" class="layui-input" id="{{estimatePurchasePrice}}" win-verify="money"/></td>
			<td><input type="text" class="layui-input" id="{{salePrice}}" win-verify="money"/></td>
		</tr>
	</script>
	
	<script src="../../assets/lib/layui/layui.js"></script>
   	<script src="../../assets/lib/layui/custom.js"></script>
   	<script type="text/javascript">
		layui.config({base: '../../js/material/'}).use('materialadd');
	</script>
</body>
</html>